home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
glass
/
glass.lha
/
GLASS
/
dtm
/
DtmMain.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-06-18
|
2KB
|
65 lines
/*
code to initialize the application
*/
static Widget top, form, pane, inputs, outputs;
static Widget recompute, stop;
static void StopIt ()
{ exit(0);
};
static int init_sig[] = {0};
static XtAppContext MyContext;
static Display *MyDisplay;
/*
The main program
*/
main (argc, argv)
int argc;
char **argv;
{ Widget button, tail;
/* Initialize the toolkit and parse the arguments */
XtToolkitInitialize ();
MyContext = XtCreateApplicationContext ();
MyDisplay = XtOpenDisplay (MyContext, (char *)0, "xdtm",
"xDtm", (char *)0, 0, &argc, argv);
top = XtAppCreateShell ("xdtm", "xDtm",
applicationShellWidgetClass, MyDisplay, NoArgs);
/* XtGetApplicationResources (top, &MyResources,
resources, XtNumber (resources), NULL, 0); */
StartArgs;
SetArg (XtNdefaultDistance, 4);
form = XtCreateManagedWidget ("topform", formWidgetClass,
top, UseArgs);
StartArgs;
SetArg (XtNleft, XtChainLeft);
SetArg (XtNright, XtChainLeft);
SetArg (XtNbottom, XtChainTop);
SetArg (XtNtop, XtChainTop);
Callback (StopIt);
stop = XtCreateManagedWidget ("Stop", commandWidgetClass,
form, UseArgs);
StartArgs;
SetArg (XtNleft, XtChainLeft);
SetArg (XtNtop, XtChainTop);
SetArg (XtNright, XtChainLeft);
SetArg (XtNbottom, XtChainTop);
SetArg (XtNfromHoriz, stop);
Callback (ReCompute);
recompute = XtCreateManagedWidget ("Recompute", commandWidgetClass,
form, UseArgs);
StartArgs;
SetArg (XtNleft, XtChainLeft);
SetArg (XtNtop, XtChainTop);
SetArg (XtNfromVert, stop);
pane = XtCreateManagedWidget ("Pane", panedWidgetClass,
form, UseArgs);
StartArgs;
inputs = XtCreateManagedWidget ("Inputs", signalmgrWidgetClass,
pane, UseArgs);
StartArgs;
outputs = XtCreateManagedWidget ("Outputs", signalmgrWidgetClass,
pane, UseArgs);